﻿using System;
using System.Globalization;
using TSites.GUI.Enums;

namespace TSites.GUI.Languages
{
	public class CultureInfoFactory
	{
		public static string BASEDNAME = "TSites.GUI.Languages.Lan";
		public readonly static CultureInfo VIVNFormat = CultureInfo.CreateSpecificCulture("vi-VN");
		public readonly static CultureInfo ENUSFormat = CultureInfo.CreateSpecificCulture("en-US");

		public static CultureInfo GetInstance()
		{
			CultureInfo formatProvider;
			switch (ConfigurationSingleton.Instance.Language)
			{
				case LANGUAGE.Vietnames:
					formatProvider = VIVNFormat;
					break;

				case LANGUAGE.English:
				default:
					formatProvider = ENUSFormat;
					break;
			}

			return formatProvider;
		}
	}
}
